package com.ruoyi.wcf.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wcf.mapper.WcfDisposeOperatingYearsMapper;
import com.ruoyi.wcf.domain.WcfDisposeOperatingYears;
import com.ruoyi.wcf.service.IWcfDisposeOperatingYearsService;

/**
 * 客户管理-经营年限设置Service业务层处理
 *
 * @author ruoyi
 * @date 2022-03-30
 */
@Service
public class WcfDisposeOperatingYearsServiceImpl implements IWcfDisposeOperatingYearsService
{
    @Autowired
    private WcfDisposeOperatingYearsMapper wcfDisposeOperatingYearsMapper;

    /**
     * 查询客户管理-经营年限设置
     *
     * @param id 客户管理-经营年限设置主键
     * @return 客户管理-经营年限设置
     */
    @Override
    public WcfDisposeOperatingYears selectWcfDisposeOperatingYearsById(Long id)
    {
        return wcfDisposeOperatingYearsMapper.selectWcfDisposeOperatingYearsById(id);
    }

    /**
     * 查询客户管理-经营年限设置列表
     *
     * @param wcfDisposeOperatingYears 客户管理-经营年限设置
     * @return 客户管理-经营年限设置
     */
    @Override
    public List<WcfDisposeOperatingYears> selectWcfDisposeOperatingYearsList(WcfDisposeOperatingYears wcfDisposeOperatingYears)
    {
        return wcfDisposeOperatingYearsMapper.selectWcfDisposeOperatingYearsList(wcfDisposeOperatingYears);
    }

    /**
     * 新增客户管理-经营年限设置
     *
     * @param wcfDisposeOperatingYears 客户管理-经营年限设置
     * @return 结果
     */
    @Override
    public int insertWcfDisposeOperatingYears(WcfDisposeOperatingYears wcfDisposeOperatingYears)
    {
        wcfDisposeOperatingYears.setCreateTime(DateUtils.getNowDate());
        return wcfDisposeOperatingYearsMapper.insertWcfDisposeOperatingYears(wcfDisposeOperatingYears);
    }

    /**
     * 修改客户管理-经营年限设置
     *
     * @param wcfDisposeOperatingYears 客户管理-经营年限设置
     * @return 结果
     */
    @Override
    public int updateWcfDisposeOperatingYears(WcfDisposeOperatingYears wcfDisposeOperatingYears)
    {
        return wcfDisposeOperatingYearsMapper.updateWcfDisposeOperatingYears(wcfDisposeOperatingYears);
    }

    /**
     * 批量删除客户管理-经营年限设置
     *
     * @param ids 需要删除的客户管理-经营年限设置主键
     * @return 结果
     */
    @Override
    public int deleteWcfDisposeOperatingYearsByIds(Long[] ids)
    {
        return wcfDisposeOperatingYearsMapper.deleteWcfDisposeOperatingYearsByIds(ids);
    }

    /**
     * 删除客户管理-经营年限设置信息
     *
     * @param id 客户管理-经营年限设置主键
     * @return 结果
     */
    @Override
    public int deleteWcfDisposeOperatingYearsById(Long id)
    {
        return wcfDisposeOperatingYearsMapper.deleteWcfDisposeOperatingYearsById(id);
    }
}
